import request from '@/utils/request'

// 查询预测单列表
export function listForecast(query) {
  return request({
    url: '/mes/wm/forecast/list',
    method: 'get',
    params: query
  })
}

// 查询预测单详细
export function getForecast(id) {
  return request({
    url: '/system/forecast/' + id,
    method: 'get'
  })
}

// 新增预测单
export function addForecast(data) {
  return request({
    url: '/system/forecast',
    method: 'post',
    data: data
  })
}

// 修改预测单
export function updateForecast(data) {
  return request({
    url: '/system/forecast',
    method: 'put',
    data: data
  })
}

// 删除预测单
export function delForecast(id) {
  return request({
    url: '/system/forecast/' + id,
    method: 'delete'
  })
}

//同步数据
export function syncData(id) {
  return request({
    url: '/mes/wm/forecast/syncData',
    method: 'get'
  })
}
